package com.zzz.hook;

import android.util.Log;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class AmsInvocationHandler implements InvocationHandler {
    private Object iActivityManagerObj;

    public AmsInvocationHandler(Object iActivityManagerObj){
        this.iActivityManagerObj=iActivityManagerObj;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        Log.i("HookUtil",method.getName());

        if("startActivity".contains(method.getName())){
            Log.i("HookUtil","Hookstart");
        }
        return method.invoke(iActivityManagerObj,args);
    }
}
